package org.jgs1904.publisherandlistener.listener;

import org.jgs1904.publisherandlistener.event.MyTestEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 定义监听器
 *
 * @author: 默苍璃
 * @date: 2023-11-03 18:34
 */
@Component
public class MyNoAnnotationListener2 implements ApplicationListener<MyTestEvent> {

    @Override
    public void onApplicationEvent(MyTestEvent event) {
        System.out.println("我也听到了：" + event.getMsg());
    }

}

